/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package presentation.view;

/**
 *
 * @author Joanna 8a
 */
public class PanelCalificaciones extends javax.swing.JPanel {

    /**
     * Creates new form PanelCalificaciones
     */
    public PanelCalificaciones(boolean ver) {
        initComponents();
        if (ver){
            setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Ver Notas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI Light", 1, 14), java.awt.Color.darkGray));
            jButtonAñadirNota.setVisible(false);
            jButtonQuitarNota.setVisible(false);
            jButtonGuardar.setVisible(false);
        }else{
        setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Modificar Notas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI Light", 1, 14), java.awt.Color.darkGray));
        }
            
        /**
         * @param opc si es 1: Ver Notas, si es 2: Modificar Notas
         */
       
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabelMateria = new javax.swing.JLabel();
        jComboBoxMateriasNotas = new javax.swing.JComboBox();
        jScrollPaneTablaNotas = new javax.swing.JScrollPane();
        jTableNotas = new javax.swing.JTable();
        jButtonVolverNt = new javax.swing.JButton();
        jButtonAñadirNota = new javax.swing.JButton();
        jButtonQuitarNota = new javax.swing.JButton();
        jButtonGuardar = new javax.swing.JButton();

        setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Calificaciones", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI Light", 1, 14), java.awt.Color.darkGray)); // NOI18N

        jLabelMateria.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jLabelMateria.setText("Materia");

        jComboBoxMateriasNotas.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jComboBoxMateriasNotas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecciones Materia" }));

        jTableNotas.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jTableNotas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"1", null, null, null},
                {"2", null, null, null},
                {"3", null, null, null},
                {"4", null, null, null},
                {"Total", null, null, null}
            },
            new String [] {
                "Nota", "Calificación", "Ponderación", "Total"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPaneTablaNotas.setViewportView(jTableNotas);

        jButtonVolverNt.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButtonVolverNt.setText("Volver");

        jButtonAñadirNota.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButtonAñadirNota.setText("Añadir Nota");

        jButtonQuitarNota.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButtonQuitarNota.setText("Quitar Nota");

        jButtonGuardar.setFont(new java.awt.Font("Segoe UI Light", 0, 14)); // NOI18N
        jButtonGuardar.setText("Guardar");
        jButtonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonGuardarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButtonGuardar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButtonAñadirNota)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonQuitarNota)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonVolverNt))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabelMateria)
                            .addGap(18, 18, 18)
                            .addComponent(jComboBoxMateriasNotas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jScrollPaneTablaNotas, javax.swing.GroupLayout.PREFERRED_SIZE, 382, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jComboBoxMateriasNotas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMateria))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPaneTablaNotas, javax.swing.GroupLayout.PREFERRED_SIZE, 202, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonVolverNt)
                    .addComponent(jButtonQuitarNota)
                    .addComponent(jButtonAñadirNota)
                    .addComponent(jButtonGuardar)))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGuardarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonGuardarActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonAñadirNota;
    private javax.swing.JButton jButtonGuardar;
    private javax.swing.JButton jButtonQuitarNota;
    private javax.swing.JButton jButtonVolverNt;
    private javax.swing.JComboBox jComboBoxMateriasNotas;
    private javax.swing.JLabel jLabelMateria;
    private javax.swing.JScrollPane jScrollPaneTablaNotas;
    private javax.swing.JTable jTableNotas;
    // End of variables declaration//GEN-END:variables
}
